package yl.hs.bmipfull.service.finance;

import yl.hs.bmipfull.pojo.finance.MoneyTradeEntity;
import yl.hs.bmipfull.pojo.finance.ReceivePaymentRecordEntity;
import yl.hs.bmipfull.viewmodels.PageQuery;
import yl.hs.bmipfull.viewmodels.PageResult;
import yl.hs.bmipfull.viewmodels.SubmitModel;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * @author 张凯
 * @apiNote 首款信息-IService
 * @since 2022/1/11 4:20 下午 创建
 */
public interface IReceivePaymentRecordService  extends IFinanceService{


    /**
     * 根据合同sn合计收款金额
     * @param contractSn 合同Sn
     * @return 合计金额
     */
    BigDecimal sumAmountByContractSn(String contractSn);


    /**
     * 保存付款记录信息
     * @param submitModel 提交数据
     * @return 执行结果
     * @throws Exception 保存异常
     */
    boolean savePayment(SubmitModel submitModel) throws Exception;

    /**
     * 根据sn删除付款记录信息
     * @param sn sn信息
     * @return 执行结果
     */
    boolean deleteBySn(String sn);


    /**
     * 查询收款记录表信息
     * @param pageQuery 查询条件 {@link PageQuery}
     * @return 收款记录表信息-List<{@link ReceivePaymentRecordEntity}>
     * @throws Exception 查询参数异常
     */
    List<ReceivePaymentRecordEntity> queryList(PageQuery pageQuery)throws Exception;
    /**
     * 查询收款记录表信息
     * @param pageQuery 查询条件 {@link PageQuery}
     * @param rowNum 每页条数
     * @param page 页码
     * @return 收款记录表分页信息-PageResult<{@link ReceivePaymentRecordEntity}>
     * @throws Exception 查询条件异常
     */
    PageResult<Object> queryPage(PageQuery pageQuery, int rowNum, int page) throws Exception;
    /**
     * 查询收款记录表信息
     * @param pageQuery 查询条件 {@link PageQuery}
     * @param rowNum 每页条数
     * @param page 页码
     * @return 收款记录表分页信息-PageResult<{@link ReceivePaymentRecordEntity}>
     * @throws Exception 查询条件异常
     */
    PageResult<ReceivePaymentRecordEntity> queryPageConstruction(PageQuery pageQuery, int rowNum, int page) throws Exception;
    PageResult<MoneyTradeEntity> queryRecordPage(PageQuery query, int rowNum, int page);
    List<ReceivePaymentRecordEntity> queryByContractSnAndTime(String contractSn);
}
